package kr.co.exight.onApp;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

public class ExTabActivity extends TabActivity{
	
	//public static TabWidget tabWidget;
	
	@Override
	public void onCreate(Bundle savedInstanceState){
		super.onCreate(savedInstanceState);
		//tabWidget = getTabWidget();
	}
	
	protected void addTab(Intent intent, int tabIndicatorId, String tabName){
	
		
		//�����̳� ����//////////////////
		//////////////////////////////////////////////		
		TabHost tabHost = getTabHost();
		LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT, 0.0f);
		RelativeLayout rlContainer = new RelativeLayout(this);
		rlContainer.setLayoutParams(params);
		
		rlContainer.setBackgroundResource(tabIndicatorId);
		//////////////////////////////////////////////
		TabSpec tabSpec = tabHost.newTabSpec(tabName);		
		tabSpec.setIndicator(rlContainer);
		tabSpec.setContent(intent);

		tabHost.addTab(tabSpec);	
		
	}	
	
}
